package router

import (
	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// APIRouterV1Handler 初始化srv/v1路由
func APIRouterV1Handler(g *inject.Graph) *gear.Router {
	r := gear.NewRouter(gear.RouterOptions{
		Root:                  "/api/v1",
		IgnoreCase:            true,
		FixedPathRedirect:     true,
		TrailingSlashRedirect: true,
	})

	// 注册路由映射
	ApiAlipayAppMap(g, r)
	ApiWechatAppMap(g, r)

	return r
}
